using UnityEngine;
using UnityEngine.UI;

public class KillFeedPopup : MonoBehaviour
{
	public GameObject Frame;

	public Text KillCount;

	public Text KillDetail;

	public float Duration = 3f;

	private float timeTmp;

	private void Start()
	{
	}

	public void Kill(string victim, string killer, int killcount, string killtype)
	{
		if (KillCount != null)
		{
			KillCount.text = "Kill " + killcount.ToString();
		}
		if (KillDetail != null)
		{
			KillDetail.text = killer + " " + killtype + " " + victim;
		}
		timeTmp = Time.time;
		if (Frame != null)
		{
			Frame.SetActive(value: true);
		}
	}

	private void Update()
	{
		if (Frame != null && Frame.activeSelf && Time.time >= timeTmp + Duration)
		{
			Frame.SetActive(value: false);
		}
	}
}
